ADFA-4961: backup/restore UI → module-install template + live-ready return - #315
Merged
Conversation
Restyle the backup/restore screens as a compact copy of the module-management install template (fragment_k2go_module_install), not Clone. First integration, kept simple. - BackupJobFragment: now inflates fragment_k2go_backup_job.xml (title + subtitle, the shared working Lottie with the app logo composited on top, a fixed 2-line status line, the 'this takes time' card, a collapsible log left GONE for a future output-plumbing pass) instead of building views by hand. No Start button — the intro card is the trigger, so the screen auto-opens the file picker on a fresh entry; it drives from DeepOpProgressRepository and re-binds on recreation / notification return. At the terminal state it shows the result and STAYS (like the module card), with a Finish button. Back while running is consumed with a styled snackbar (was a Toast). - BackupRestoreFragment (bifurcation): the two cards get Material icons (archive / unarchive); on return from a finished op (Finish), it runs the module-index-style 'returning to Home' 3s countdown with a Cancel. - New: ic_archive / ic_unarchive vectors, fragment_k2go_backup_job.xml, k2go_bj_* strings. Note: the Lottie still has the little cloud; a cloud-less variant is a separate later pass. Wants a device look-over.
… lands on the bifurcation - Since the op runs in DeepOpService and survives backgrounding (ADFA-4957/4960), leaving no longer interrupts it. Back while running now shows a soft, mode-specific hint and returns to the bifurcation instead of hard-blocking: 'Backup/Restore is running — you can leave; it keeps going and will be ready when you come back.' (matches the module-index leave-hint). Drops the old 'can't be interrupted' string (k2go_br_busy_wait, now unused). - popToIntro: Finish (and cancels) always land on the bifurcation. In the deep-link case (reopened via the notification, no bifurcation underneath) it now shows the bifurcation — which runs the return-to-Home countdown — instead of jumping straight Home.
…directing (like the index) The return-to-Home countdown was a blind 3s -> Home, which could drop the user on a Home still starting (the state we hardened yesterday). Now it mirrors SetupProgressActivity: boot the environment via serverController.startEnvironment() (unconditional, never the toggle) and poll RestReadiness.apiReady() every 2s off the main thread until the REST core answers, THEN redirect to an already-live Home. Cancel keeps the user on the bifurcation; a 45s timeout still goes Home so they're never trapped (Home's boot gate then owns the rest).
…eric template loop) Add the dedicated working loops (open box + streaming dots + glow; backup = phone->box, restore = box->phone) and select them by mode in BackupJobFragment instead of the shared k2go_working_loop. Per the design spec these replace the cloud with a box and still composite the K2Go logo via the app, so the existing logo scaffold (right ~0.82W/0.53H) is unchanged. Also resolves the 'little cloud' note.
setTextAppearance() was called after setTextColor() on the countdown message, so Material3's default (light) color overrode the intended teal, leaving it near-invisible on the pale info background (Cancel was fine — it has no appearance). Set the color after the appearance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restyles backup/restore to the module-install template (not Clone), first pass.
fixed 2-line status, "this takes time" card, log GONE for now. No Start button (the card triggers it,
auto-opening the picker); Finish at the end. Drives from DeepOpProgressRepository.
live (startEnvironment + RestReadiness.apiReady poll) before redirecting to Home — no more landing on
a still-starting Home. Cancel stays; 45s timeout goes Home anyway.
"you can leave; it'll be ready when you come back" hint and returns to the bifurcation.
New: ic_archive / ic_unarchive, fragment_k2go_backup_job.xml, k2go_bj_* strings.